/*
 * Copyright DimYLiK.
 */

package com.example.myapp.client.components;

public class LanguageButton extends AntiBaldaButton {

    private static final String BUTTON_STYLE = "languageButton";
    private static final String BUTTON_STYLE_ACTIVE = "languageButtonActive";

    public LanguageButton(String label, String title, boolean isActive) {
        super(label, title);

        updateActiveStyle(isActive);
    }

    public void updateActiveStyle(boolean isActive) {
        if (isActive) {
            setActiveStyle();
        } else {
            setInactiveStyle();
        }
    }

    public void setActiveStyle() {
        setStyleName(BUTTON_STYLE_ACTIVE);
    }

    public void setInactiveStyle() {
        setStyleName(BUTTON_STYLE);
    }
}
